<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>金币录入管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
         $(function(){	
        	 $("#d_div").html(" <div class='control'  name='div_num'     id='1'>"+   
			   "<select  id='sel_name1' class='input-large required' >"+ 
			      "   <option value=''>请选择</option>"+
			       "  <c:forEach items='${list}' var='aegisRuleSets' varStatus='i' > "+
			        "  <option value='${aegisRuleSets.id}'>${aegisRuleSets.rulesetname}</option>"+
			        "  </c:forEach> "+
		   "   </select> "+
		       "发放金币 "+
		   "<input  htmlEscape='false'  maxlength='80'  id='div1'  style='display:none'  class='input-small required'/>"+
		   "<input  htmlEscape='false' maxlength='80' id='div2'  style= 'display:none'  class='input-small required'/>"+
		  " <input  htmlEscape='false' maxlength='80' id='div3'  style='display:none'  class='input-small required'/>"+
		 "  <input  htmlEscape='false' maxlength='80' id='div4'  style='display:none'  class='input-small required'/>"+ 
		   	 
		   	 
		   	" <select name='goldcoinstyle'  style='width: 170px; height: 30px;' id='cc1' onchange='getStyle(1)' >"	+  
			      "  <option value=''>请选择</option>"+
		           " <option value='01'>固定金币个数</option>"+
		           " <option value='03'>随机范围金币</option>"+	  
			 " </select>"+
			" <a id='a1' href='javaScript:void(0);' onclick='delectDiv(1)' style='color:blue;'>删除</a>" +
			" <a id='aa1' href='javaScript:void(0);' onclick='addDiv(1)' style='color:blue;'>添加条件</a> "+	  
		"</div> "
     			 ) 
	 
         var branchId=$("#branchid").val();	
           //初始化数据
		   //获得待发行的金币 
     		$.ajax({  
     		        type:"POST",  
     		         url: "${ctx}/goldinput/goldcoin/getDistributionList?branchId="+branchId,
     		         dataType:'json',  
     		         async:false,  
     		          success:function(result){  
     		        	   rr = eval(result);	 
     		        	  for(i=0 ; i<rr.length;i++){
     		        		  rr[0].goldCoinMark;	  
     			                $("#goldCoin").append(
     			                        "<option value='"+rr[i].id+"'>"+rr[i].goldcoinmark
     			                                + "</option>");
     			        }
     			        }		 
     	    });	
         }
		 )	
	Date.prototype.format = function(format) {
     var date = {
              "M+": this.getMonth() + 1,
              "d+": this.getDate(),
              "h+": this.getHours(),
              "m+": this.getMinutes(),
              "s+": this.getSeconds(),
              "q+": Math.floor((this.getMonth() + 3) / 3),
              "S+": this.getMilliseconds()
       };
       if (/(y+)/i.test(format)) {
              format = format.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));
       }
       for (var k in date) {
              if (new RegExp("(" + k + ")").test(format)) {
                     format = format.replace(RegExp.$1, RegExp.$1.length == 1
                            ? date[k] : ("00" + date[k]).substr(("" + date[k]).length));
              }
       }
       return format;
}
		 
		function gold_Coin(){
		  var goldCoinId=	$("#goldCoin").val();	
				 //获得待发行的金币 
	     		$.ajax({  
	     		        type:"POST",  
	     		         url: "${ctx}/goldinput/goldcoin/getGoldCoinAjax",
	     		         data:"goldcoinid="+goldCoinId,
	     		         dataType:'json',  
	     		         async:false,  
	     		          success:function(result){  
	     		        	   rr = eval(result);
	     		        	  // alert(rr.activityname);
	     		        	  $("#goldcoinname").val(rr.goldcoinname) ;
	     		        	  $("#goldcoinmark").val(rr.goldcoinmark) ;
	     		        	  $("#activityname").val(rr.activityname) ;
	     		        	  var goldcoincollectionstart = new Date(rr.goldcoincollectionstart);
	     		              var goldcoincollectionend =new Date(rr.goldcoincollectionend);
	     		        	  $("#goldcoincollectionstart").val(goldcoincollectionstart.format("yyyy-MM-dd hh:mm:ss") ) ;
	     		        	  $("#goldcoincollectionend").val(goldcoincollectionend.format("yyyy-MM-dd hh:mm:ss")) ;
	     		        	  $("#goldcoinlimitnumber").val(rr.goldcoinlimitnumber) ;
	     		        	  $("#goldcoindistributiontotalnumber").val(rr.goldcoindistributiontotalnumber) ;
	        	               if(rr.goldcoinvaliditystyle=='01'){
	     		        		 $("#goldcoinvaliditystyle").val("固定时间段 ") ;  	
	     		        		var goldcoinvaliditystart = new Date(rr.goldcoinvaliditystart);
	     		        		var goldcoinvalidityend = new Date(rr.goldcoinvalidityend);
	     		        		$("#goldcoinvaliditys").val(goldcoinvaliditystart.format("yyyy-MM-dd hh:mm:ss")+" 至   "+goldcoinvalidityend.format("yyyy-MM-dd hh:mm:ss")) ;	 
	     		        	  }else if(rr.goldcoinvaliditystyle=='02'){
	     		        		 $("#goldcoinvaliditystyle").val("按季度计算有效期 ") ;
	     		        		var goldcoincollectionstart = new Date(rr.goldcoincollectionstart);
	     		        		var goldcoinvalidityend = new Date(rr.goldcoinvalidityend);
	     		        		$("#goldcoinvaliditys").val(goldcoincollectionstart.format("yyyy-MM-dd hh:mm:ss")+" 至   "+goldcoinvalidityend.format("yyyy-MM-dd hh:mm:ss")) ;	        		 	 
	     		        	  }else if(rr.goldcoinvaliditystyle=='03'){		  
	     		        		 $("#goldcoinvaliditystyle").val("有效天数") ;
	     		        		var goldcoincollectionstart = new Date(rr.goldcoincollectionstart);
	     		        		var  goldcoinactivity= new Date(rr.goldcoininvalidity);
	     		        		$("#goldcoinvaliditys").val(goldcoincollectionstart.format("yyyy-MM-dd hh:mm:ss")+" 至   "+goldcoinactivity.format("yyyy-MM-dd hh:mm:ss")) ;	        		 	 		       	  
	     		        	  }
 		        	   
	     		        	 $("#description").val(rr.description) ;
	     		        	       
	     			        }		 
	     	    });	
		} 
		function overlay1(){
			 var e1 = document.getElementById('modal-overlay');
			 e1.style.visibility = (e1.style.visibility == "visible")? "hidden" : "visible"; 
			
		}   
		function addDiv(id){
	    	var idd=id+4;
 	    	 $("#aa"+id).remove();
	        $("#"+id).append("<p><div  name="+'div_num'+"  class='controls;div-left;' id='"+idd+"'>"+
			       "<select  class='input-large required' id='sel_name"+idd+"'>"+
			       "  <option value=''>请选择</option> "+
			         "<c:forEach items='${list}' var='aegisRuleSets' varStatus='i' >"+
			          "<option value='${aegisRuleSets.id}'>${aegisRuleSets.rulesetname}</option>"+
			          "</c:forEach>"+
		           "</select>"+"发放金币"+
		           " <input  htmlEscape='false' maxlength='80'   style='display:none'  class='input-small required' id='div"+idd+"'/>"+
		           " <input  htmlEscape='false' maxlength='80'   style='display:none'  class='input-small required' id='div"+(idd+1)+"'/>"+
		           " <input  htmlEscape='false' maxlength='80'   style='display:none'  class='input-small required' id='div"+(idd+2)+"'/>"+
		           " <input  htmlEscape='false' maxlength='80'   style='display:none'  class='input-small required' id='div"+(idd+3)+"'/>"+
		           
		          " <select name='goldcoinstyle'   style='width: 170px; height: 30px;'  onchange='getStyle("+idd+")'  id='cc"+idd+"'>"+	  
			      "  <option value=''>请选择</option> "+
		          "  <option value='01'>固定金币个数</option>"+
		         /*  "  <option value='02'>固定百分比金币</option>"+ */
		          "  <option value='03'>随机范围金币</option>"+		  
			      "  </select>"+
		   "  <a id='a"+idd+"' href='javaScript:void(0);' onclick='delectDiv("+idd+")' style='color:blue;'>删除</a>"+
           "  <a id='aa"+idd+"' href='javaScript:void(0);' onclick='addDiv("+idd+")' style='color:blue;'>再添加一条</a>"+
	               "</div></P>");
	  
	        } 
		 function delectDiv(id){
			 var a=	document.getElementsByName("div_num").length
			  if((4*a-3)==id){
               if(a==1){
            	   alert("第一行不能删除  ")  
               }else if(a>1){
			    var dd=id-4;
		    	$("#"+id).remove();
		    	$("#a"+dd).after(" <a id='aa"+dd+"' href='javaScript:void(0);' onclick='addDiv("+dd+")' style='color:blue;'>再添加一条</a>");
               }
               }
			else{
				alert("必须从最后一行删除 ")
			}
			}
		function getStyle(id){	
		  var ValidityStyle=$("#cc"+id).val() ;
		  if(ValidityStyle=="01"){  
			  $("#div"+id).show();
			  $("#div"+(id+1)).hide();
			  $("#div"+(id+2)).hide();
			  $("#div"+(id+3)).hide();
		  }	else if(ValidityStyle=="02"){
			  $("#div"+(id+1)).show();
			  $("#div"+(id)).hide();
			  $("#div"+(id+2)).hide();
			  $("#div"+(id+3)).hide();
		  } else if(ValidityStyle=="03"){
			  $("#div"+(id+3)).show();
			  $("#div"+(id+2)).show();
			  $("#div"+(id)).hide();
			  $("#div"+(id+1)).hide();	
		}else if(ValidityStyle==""){
			 $("#div"+(id+3)).hide();
			  $("#div"+(id+2)).hide();
			  $("#div"+(id)).hide();
			  $("#div"+(id+1)).hide();	
		}
		}
    function check(){
     		var list_map_value = new Array();
			//获取div的个数
			var a=	document.getElementsByName("div_num").length
			for(i=1;i<=a;i++){
				var  aa=	$("#sel_name"+(4*i-3)).find("option:selected").val();
				if(aa!=null&&aa!=""){
				$.ajax({  
	 		        type:"POST",  
	 		         url: "${ctx}/goldinput/goldcoin/getAjaxRuleSet",
	 		         data:"id="+aa,
	 		         dataType:"json", 
	 		         async:false,  
	 		         success:function(result){
	 		        	list_map_value.push({"rulesetname": result.rulesetname,"value":result.value} );		 
	          }	 
	 	    });	
			}
			}		
	 	//动态生成表格
		   var html = "";
             for( var i = 0; i < list_map_value.length; i++ ) {
                 html += "<tr>";
                 html += "<td>" + list_map_value[i].rulesetname + "</td>"
                 html += "<td>" + list_map_value[i].value + "</td>"
                 html += "<tr>";
             }  
             
				
            $("#J_TbData").html(html);
		var e1 = document.getElementById('modal-overlay');
		e1.style.visibility = (e1.style.visibility == "visible")? "hidden" : "visible";		
		} 
     function btn_save1(){
			var list_map = new Array();
			//获取div的个数
			var a=	document.getElementsByName("div_num").length
			var ary = new Array();
			for(i=1;i<=a;i++){
			var  aa=	$("#sel_name"+(4*i-3)).find("option:selected").val();
			var  bb=	$("#cc"+(4*i-3)).find("option:selected").val();	
			var  hh=	$("#goldCoin").val();
			var  time1=	$("#goldcoincollectionstart").val();
			var  time2=	$("#goldcoincollectionend").val();
			var  cc="";
			var  dd="";
			var  gg="";
			var  goldcoinlimit="";
			var  goldcoindistributiontotalnumber="";
			ary.push(aa);
	        if(hh==''|| hh==null){
	        	alert("请选择金币")
	        	return;
	        }
			if(aa==null||aa==''||bb==null||bb==''){
				alert("请输入规则")
				return;
			}
			if(bb=='01'){
			cc=	$("#div"+(4*i-3)).val();
		 	 goldcoinlimit =$("#goldcoinlimitnumber").val();
			 goldcoindistributiontotalnumber =$("#goldcoindistributiontotalnumber").val();
			if(parseInt(cc)>parseInt(goldcoinlimit)){
				alert("发放金币的个数不能大于限领个数")
				return;
			}
			if(parseInt(cc)>parseInt(goldcoindistributiontotalnumber)){
				alert("发放金币的个数不能大于发放总个数")
				return;
			}	
			if(cc==null||cc==''){
			  alert("请输入发放金币数量")
			  return;
		      } 
         list_map.push({"ruleId": aa,"distributioStyle": bb, "fixedDistributionNumber":cc ,"goldCoinId" :hh ,"collectionStart" :time1, "collectionEnd" :time2} );	
			}
			if(bb=='02'){
			 dd=	$("#div"+(4*i-2)).val();
			 if(dd==null||dd==''){
					alert("请输入百分比")
					return;
				} 
			 list_map.push({"ruleId": aa,"distributioStyle": bb ,"percent":dd, "goldCoinId" :hh ,"collectionStart" :time1, "collectionEnd" :time2} );			
			}
			 if(bb=='03'){
				var  mm=	$("#div"+(4*i-1)).val();
				var  nn=	$("#div"+(4*i)).val();
			var	 goldcoinlimit =$("#goldcoinlimitnumber").val();
			var	 goldcoindistributiontotalnumber =$("#goldcoindistributiontotalnumber").val();
				if(parseInt(mm)>=parseInt(nn)){
					alert("随机数结束数值必须大于开始数值")
					return;
				}
				if(parseInt(nn)>parseInt(goldcoinlimit)){
					alert("随机数的最大值必须小于等于金币限领个数")
					return;
				}
				if(parseInt(nn)>parseInt(goldcoindistributiontotalnumber)){
					alert("随机数的最大值必须小于金币总个数")
					return;
				}	
				if(mm==null||mm==''||nn == null||nn==""){
					alert("请输入随机数")
					return;
				}	
			  gg=	mm+','+nn;	
			  list_map.push({"ruleId": aa,"distributioStyle": bb,"random":gg ,"goldCoinId" :hh ,"collectionStart" :time1, "collectionEnd" :time2} );	
			 }
			 //list_map.push({ruleId: aa,distributioStyle: bb,random:gg ,goldCoinId :hh ,collectionStart :time1, collectionEnd :time2} );	
              }		
			var json = JSON.stringify(list_map);
			var nary=ary.sort();
			for(var i=0;i<ary.length;i++){
			if (nary[i]==nary[i+1]){
			alert("规则集不能重复");
			return;
			}
			} 
			//var vv=  JSON.parse(json);
			//alert(json);
			var branchId=$("#branchid").val();			
			$.ajax({  
 		        type:"POST",  
 		         url: "${ctx}/goldinput/goldcoin/goldcoinrule?branchId="+branchId,
 		         data:{"list":json},
 		         dataType:'json',  
 		         async:false,  
 		         success:function(result){  
 		        	if(result.code=="02"){//失败
 		        		alert("金币发行不成功")		
 		        	}else if(result.code=="01"){
 		        		 window.location.href="${ctx}/goldinput/goldcoin/distributequery?branchId="+branchId 	
 		        	}
 		         }
          	 
 	    });	
			}
        
		function back(){	
			      $("#goldcoinname").val("") ;
	        	  $("#goldcoinmark").val("") ;
	        	  $("#activityname").val("") ;
	        	  $("#goldcoincollectionstart").val("" ) ;
		          $("#goldcoincollectionend").val("") ;
		          $("#goldcoinlimitnumber").val("") ;
		          $("#goldcoindistributiontotalnumber").val("") ;
		          $("#goldcoinvaliditystyle").val("") ;
		          $("#description").val("") ;
		          $("#goldcoinvaliditys").val("");
		          $("#sel_name1").empty();
		          $("#cc1").empty();	
		 window.location.reload();}
		</script>
		<style>
/*   #head{
         margin-left:0px;
         margin-right:0px;
         margin-top:0px;
         margin-bottom:0px;
        width:100%;
	    height:37px;
	    background-color: #5599FF;
        } */
#modal-overlay {
      
	visibility: hidden;
	position: absolute; /* 使用绝对定位或固定定位  */
	left: 0px;
	top: 0px;
    width: 100%;
	height: 100%;  
	text-align: center;
	z-index: 1000;
	background-color: rgba(0, 0, 0, 0.7);
	/* opacity: 0.5;    背景半透明 */
}
/* 模态框样式 */
.modal-data {
    overflow-y:auto;
    overflow-x:hidden;
	width: 650px;
	height: 400px;
	margin: 150px auto;
	background-color: #fff;
	border: 1px solid #000;
	padding: 0px;
	text-align: center;
	position:relative;
}
.modal-data-line{
position:relative;
left:0px;
bottom:10px;
 margin-top:100px;
}

/* 去除表格 */
.modal-data.table, tr, td {
	border: 0px solid black;
}
  * { padding: 0; margin: 0; }
        table {
            border-collapse: collapse;
            border-spacing: 0;
            border: 1px solid #c0c0c0;
        }

        th,td {
            border: 1px solid #d0d0d0;
            color: #404060;
            padding: 10px;
            width: 850px;
        }

        th {
            background-color: #09c;
            font: bold 16px "微软雅黑";
            color: #fff;
        }

        td {
            font: 14px "微软雅黑";
        }
        tbody tr {
            background-color: #f0f0f0;
        }
        tbody tr:hover {
            cursor: pointer;
            background-color: #fafafa;
        }
</style>
		
		

</head>
<body>	
	<li>金币管理->金币发行</li>
	<form:form id="inputForm" modelAttribute="goldcoinWapper"  class="form-horizontal">

		
		<sys:message content="${message}"/>	
		
	<div class="control-group">
			<label class="control-label">请选择金币：</label>
			<div class="controls">
			  <select name="goldCoin" style="width: 100px; height: 30px;" id="goldCoin"  onchange="gold_Coin()" >	
			   <option value="">请选择</option>
			  </select>
			  <span  id="span8" style="display:none;" ><em style="color:red" class="goldcoinactivity"></em> </span>
				<span class="help-inline"><font color="red">*</font> </span>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			</div>
		</div>
		
		<div class="control-group">
			<label class="control-label"  >规则配置：</label>
		<p><div class="controls" id="d_div"></div></p>
		<!-- <p id="aa">	 -->
	<%-- 	<div class="controls"  name="div_num"     id="1">
			   
			   <select  id='sel_name1' class='input-large required' >
			         <option value="">请选择</option>
			         <c:forEach items='${list}' var='aegisRuleSets' varStatus='i' >
			          <option value='${aegisRuleSets.id}'>${aegisRuleSets.rulesetname}</option>
			          </c:forEach>
		      </select> 
		            发放金币 
		   <input  htmlEscape="false" maxlength="80" id="div1"  style="display:none"  class="input-small required"/>
		   <input  htmlEscape="false" maxlength="80" id="div2"  style= "display:none"  class="input-small required"/>
		   <input  htmlEscape="false" maxlength="80" id="div3"  style="display:none"  class="input-small required"/>
		   <input  htmlEscape="false" maxlength="80" id="div4"  style="display:none"  class="input-small required"/> 
		   	 
		   	 
		   	 <select name="goldcoinstyle"  style="width: 170px; height: 30px;" id="cc1" onchange="getStyle(1)" >	  
			        <option value="">请选择</option>
		            <option value="01">固定金币个数</option>
		           <!--  <option value="02">固定百分比金币</option> -->
		            <option value="03">随机范围金币</option>		  
			  </select>
			 <a id="a1" href="javaScript:void(0);" onclick="delectDiv(1)" style="color:blue;">删除</a> 
			 <a id="aa1" href="javaScript:void(0);" onclick="addDiv(1)" style="color:blue;">添加条件</a>	  
		</div> --%>
		
		<!-- </p> -->
	
		</div>
			
		<div class="control-group">
			<label class="control-label"  >名称：</label>
			<div class="controls">
			    <form:input path="goldcoinid" htmlEscape="false" maxlength="80" id="goldcoinid"  style="display:none"  class="input-xlarge required"/>
				<form:input path="applystaffid" htmlEscape="false" maxlength="80" id="applystaffid"  style="display:none"  class="input-xlarge required"/>
				<form:input path="goldcoinname" id="goldcoinname"  htmlEscape="false" maxlength="80" readonly= "true"  class="input-xlarge required"/>
				<input name="list" value="${list}" id="goldcoinname"  htmlEscape="false" maxlength="80" style="display:none"   class="input-xlarge required"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">标识：</label>
			<div class="controls">
				<form:input path="goldcoinmark" htmlEscape="false" id="goldcoinmark" readonly= "true"  maxlength="50" class="input-xlarge required"    onblur="markValidate()"/>
				<input name="branchid" id="branchid"  style="display:none"  htmlEscape="false" value="${goldbranchid }"  maxlength="50" class="input-xlarge required"   "/>
			    <span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">金币所属活动：</label>
			<div class="controls">
			<form:input path="activityname" htmlEscape="false" id="activityname" readonly= "true"  maxlength="50" class="input-xlarge required"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">领取时间：</label>
			<div class="controls">
				<input name="goldcoincollectionstart" id="goldcoincollectionstart"     type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
					value="<fmt:formatDate value="${goldcoinWapper.goldcoincollectionstart}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					/>
			至
				<input name="goldcoincollectionend" id="goldcoincollectionend"   type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
					value="<fmt:formatDate value="${goldcoinWapper.goldcoincollectionend}" pattern="yyyy-MM-dd HH:mm:ss"/>"
					/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">限领个数：</label>
			<div class="controls">
				<form:input path="goldcoinlimitnumber" id="goldcoinlimitnumber"    htmlEscape="false" maxlength="8" readonly= "true"   class="input-small "/> 单位：个
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">发行总个数：</label>
			<div class="controls">
				<form:input path="goldcoindistributiontotalnumber"  id="goldcoindistributiontotalnumber" htmlEscape="false" readonly= "true"   maxlength="8" class="input-small required" /> 单位：个
			    <span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">金币有限期类型</label>
			<div class="controls"    >
		  <form:input path="" readonly= "true"  id="goldcoinvaliditystyle"      htmlEscape="false" maxlength="200" class="input-xlarge required"/>
		</div>
		</div>
		<div class="control-group"  >
			<label class="control-label">金币有效期：</label>
			<div class="controls" >
					
		  <form:input path="" readonly= "true"  id="goldcoinvaliditys"      class="input-xxlarge required"  />	
		
	<%-- 	<c:if
				  test="${'01' eq goldcoinWapper.goldcoinvaliditystyle}">
				  <fmt:formatDate value="${goldcoinWapper.goldcoinvaliditystart}" pattern="yyyy-MM-dd HH:mm:ss"/> 至      <fmt:formatDate value="${goldcoinWapper.goldcoinvalidityend}" pattern="yyyy-MM-dd HH:mm:ss"/> </c:if>	
			<c:if
				  test="${'02' eq goldcoinWapper.goldcoinvaliditystyle}">
				  <fmt:formatDate value="${goldcoinWapper.goldcoincollectionstart}" pattern="yyyy-MM-dd HH:mm:ss"/> 至      <fmt:formatDate value="${goldcoinWapper.goldcoinvalidityend}" pattern="yyyy-MM-dd HH:mm:ss"/> </c:if>	
			<c:if
				  test="${'03' eq goldcoinWapper.goldcoinvaliditystyle}">
				<fmt:formatDate value="${goldcoinWapper.goldcoincollectionstart}" pattern="yyyy-MM-dd HH:mm:ss"/> 至   
				<fmt:formatDate value="${goldcoinWapper.goldcoininvalidity}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</c:if>--%>
			</div> 
		</div>	
		<div class="control-group">
			<label class="control-label">描述：</label>
			<div class="controls">
				<form:input path="description"  id="description"   readonly= "true"  htmlEscape="false" maxlength="200" class="input-xlarge required"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>

		<div class="form-actions">
			<shiro:hasPermission name="goldinput:goldcoin:edit">
			 <input type="button" id="btn_save1" value="提交"
				style="width: 90px; height: 40px; margin-top: 00px; background-color: #5599FF; color: #FFFFFF"
				onclick="check()" />
				
			<input type="button" id="btn_save1" value="重置"
				style="width: 90px; height: 40px; margin-top: 00px; background-color: #5599FF; color: #FFFFFF"
				onclick="back()" />
			</shiro:hasPermission>
			
		</div>
	</form:form>
	
	
	<div id="modal-overlay"   >
		<div class="modal-data"  >

	 <table>
        <thead>
             <tr>   
                <th colspan='2'>规则再次确认</th>
            </tr>
            <tr>
                <th>规则集名称</th>
                <th>规则子集</th>
            </tr>
        </thead>
        <tbody id="J_TbData">
     
        </tbody>
     
    </table>		
	 <div class="modal-data-line">
		<input type="button" id="btn_save1" value="确定发行"
							style="width: 90px; height: 40px; margin-top: 00px; background-color: #5599FF; color: #FFFFFF"
							onclick="btn_save1()" />
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="button" id="btn_search3"
							value="取消发行"
							style="width: 90px; height: 40px; margin-top: 00px; background-color: #5599FF; color: #FFFFFF"
							onclick="overlay1()" />
		</div> 
	</div>		
	</div>


</html>